package com.ssh.io;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;

import org.junit.Test;

public class InputReaderTest {
	@Test
	public void test01() {
		File file = new File("E:\\upload\\io\\input.txt");
		try(FileReader input = new FileReader(file);) {
			FileWriter output = new FileWriter("E:\\upload\\io\\output.txt", true);
			char[] buffer = new char[100];
			while(input.read(buffer) != -1) {
				output.write(buffer);
				output.flush();
			}
			
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e1) {
			e1.printStackTrace();
		}
	}
}
